<%@page import="org.cwq.frame.appframe.util.JsonUtil"%>
<%@page import="com.easou.web.controller.webrower.WebRoomController" language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page contentType="text/html; charset=UTF-8"%>
<%@page import="com.easou.doudizhu.user.UserSessionManager"%>
<%@page import="com.easou.doudizhu.utils.RandomUtil"%>
<%@page import="com.easou.cas.auth.EucAuthResult"%>
<%@page import="com.easou.doudizhu.global.Constant"%>
<%@page import="com.easou.web.utils.SpringContextUtil"%>
<%@page import="com.easou.web.vo.GameUserBO"%>
<%@page import="com.easou.doudizhu.operate.Room"%>
<%@page import="com.easou.doudizhu.room.IRoom"%>
<%@page import="com.easou.web.service.GameUserService"%>
<%@page import="com.easou.doudizhu.operate.RoomManager"%>
<%@page import="com.easou.web.utils.StatisticLogUtil"%>

<%
	String playerId = null;
	long userId = 0;
	String userIdStr = null;
	String nickName = null;
	String roleName = null;
	int beanFunCount = 0;
	int starCount = 0;
	int candyCount = 0;
	Object ouid = request.getSession().getAttribute(Constant.SESSION_UID);
	if(ouid != null){
		long uid = Long.valueOf(ouid.toString());
		GameUserBO bo = UserSessionManager.get(uid);
		
		if (bo != null) {
			IRoom room = RoomManager.getRoom(1);
			playerId = bo.getUserName();
			nickName = bo.getNickName();
			userId = bo.getUserId();
			userIdStr = String.valueOf(userId);
			beanFunCount = bo.getBeanfun();
			starCount = bo.getStar();
			candyCount = bo.getCandy();
			roleName = bo.getRoleResourceName();
			
		} else {
		  System.out.println("play.jsp -> 用户未登录 ，重定向到登录界面");
		}
	}
	StatisticLogUtil.userVisit(request.getSession().getId(),request.getHeader("USER-AGENT"),request.getParameter("qn"),userId);   //日志统计
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<% if (request.getHeader("USER-AGENT").contains("iPhone") || request.getHeader("USER-AGENT").contains("iPod") || request.getHeader("USER-AGENT").contains("iPad")) { %>
<meta name='viewport' content='target-densitydpi=480,user-scalable=no,maximum-scale=1.0'/>
<% } else { %>
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,target-densitydpi=high-dpi,user-scalable=no">
<% } %>
<meta charset="utf-8">
<meta name="apple-mobile-web-app-status-bar-style" content="black">

<title>西游斗地主</title>
<link type="text/css" rel="stylesheet" href="css/common_new.css">
<link type="text/css" rel="stylesheet" href="css/tab.css">
</head>


<body >
	<!--横屏-->
<div class="portrait"><img  src="images/portrait_480.png"   /></div>

	
<!--竖屏  舞台-->
<div id="scene" class="scene">
	<span  class="btn_bg table_mall_pos"><span class="txt_pw_mall"></span></span>
	<div class="table_mall">
		<table class="tab-table-head" width="100%" border="0" cellspacing="0" cellpadding="0">
			  <thead><tr>
			    <th style="width:20%"><img src="images/xy/txt_rank.png" /></th>
			    <th style="width:40%"><img src="images/xy/txt_name.png" /></th>
			   <th style="width:40%"><img src="images/xy/txt_money.png" /></th>
			
			  </tr>
			  </thead>
		</table>
		<div id="rankTable"  class="rank-table" >
				<table  width="100%" border="0" cellspacing="0" cellpadding="0" bordercolor="#c39791"><tbody> </tbody></table>
			</div>
	</div>
</div>
<div id="return" class="btn_back"></div>


<script src="js/zepto.min.js"></script>
<script src="js/require.min.js"></script>
<script src="js/common_new.js"></script>
<script>
$(document).ready(function(){
	require(["js/mRank.js","js/mCommon.js"], function(rank,common){  
		common.setSize();
		rank.rank(0);
	}); 
	

	

})
</script>

</body>
</html>